<template>
    <div>
        <!-- 面包屑 -->
        <bread></bread>
        <!-- 添加按钮 -->
        <el-button @click="addDialog" plain class="btn" type="primary" size="small">添加</el-button>
        <!-- 表格 -->
        <v-list @edit="edit"></v-list>
        <!-- 弹窗 -->
        <v-dialog @close="close" :info="info" ref="diaLong"></v-dialog>
    </div>
</template>

<script>
import vList from './list.vue'
import vDialog from './dialog.vue'
export default {
    data() {
        return {
            info:{
                isShow:false,
                win:true
            }
        };
    },
    components:{
        vList,
        vDialog
    },
    methods:{
        addDialog(){
            this.info.isShow=true,
            this.info.win=true
        },
        close(e){
            this.info.isShow=e
        },
        edit(id){
            this.info.isShow=true,
            this.info.win=false,
            this.$refs.diaLong.lookup(id)
        }
    }
};
</script>

<style  lang="less" scoped>
.btn{
    margin: 10px 5px ;
}
</style>
